#include "ObjectLayout.h"
#include <QToolButton>
#include <QLabel>

ObjectLayout::ObjectLayout()
{

}



ObjectLayout::ObjectLayout(
    QHBoxLayout* widget)
{
    widget->addLayout(this);
    widget->addSpacing(100);
    this->add_sub_widget();

    QLabel* lab = new QLabel(tr("11"));
    lab->setMaximumWidth(1);
    lab->setMaximumHeight(200);
    lab->setFrameShape (QFrame::Box);
    lab->setStyleSheet("border-width: 1px;border-style: solid;border-color: rgb(0, 0, 0);");
    widget->addWidget(lab);
}



ObjectLayout::~ObjectLayout()
{}



void
ObjectLayout::add_sub_widget()
{
    QToolButton* obj_sence= new QToolButton;
    obj_sence->setIcon(QIcon(":/resource/image/sence.png"));
    obj_sence->setToolTip(tr ("场景"));
    this->addWidget(obj_sence,0,0);


    QToolButton* obj_satellite = new QToolButton;

    //file_new->setIconSize(QSize(50,50));
    obj_satellite->setIcon(QIcon(":/resource/image/satellite.png"));
    obj_satellite->setToolTip(tr ("卫星"));
    this->addWidget(obj_satellite,0,1);


    QToolButton* obj_station = new QToolButton;
    obj_station->setIcon(QIcon(":/resource/image/station.png"));
    obj_station->setToolTip(tr ("地面站"));
    this->addWidget(obj_station,0,2);


    QToolButton* obj_sensing = new QToolButton;
    obj_sensing->setIcon(QIcon(":/resource/image/sensing.png"));
    obj_sensing->setToolTip(tr ("遥感"));
    this->addWidget(obj_sensing,0,3);
 }
